﻿/*
 * @Author: your name
 * @Date: 2021-07-08 15:11:00
 * @LastEditTime: 2021-09-01 14:19:16
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \central-system\src\modules\PrivacyCenter\api.js
 */
import request from '@/utils/request'
//修改密码
export function editPassword(data) {
  return request({
    url: '/sys-user/user/pwd',
    method: 'put',
    data: data
  })
}
//获取当前用户第三方绑定账号信息
export function getExtraData(data) {
  return request({
    url: '/sys-user/oauth/users',
    method: 'get',
    params: data
  })
}
//更新用户手机号
export function updataPhone(data) {
  return request({
    url: '/sys-user/user/change/phone',
    method: 'put',
    data: data
  })
}
//更新手机号获取验证码
export function getPhoneCode(data){
  return request({
    url:'/sys-user/user/sms_change_phone_captcha',
    method:'get',
    params:data
  })
}
//更新用户邮箱
export function updateEmail(data) {
  return request({
    url: '/sys-user/user/information',
    method: 'put',
    data: data
  })
}
//第三方应用解绑
export function updataExtra(data) {
  return request({
    url: '/sys-user/oauth/user',
    method: 'DELETE',
    params: data
  })
}
export function authenticationLogin(data) {
  return request({
    url: data,
    method: 'get',
  })
}
//登出用户
export function exit(userName) {
  return request({
    url: '/sys-auth/oauth/exit',
    method: 'delete',
    params: { userName },
  })
}
